﻿@{
    Layout = "_LayoutPhone";
}
<!DOCTYPE html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<title>我的客户</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.3/css/bootstrap.min.css">
<!-- my-customer CSS -->
<link rel="stylesheet" href="~/GoTRI/css/my-customer.css">
<link rel="stylesheet" href="~/GoTRI/css/mobiscroll.custom.min.css">
<link rel="stylesheet" href="~/GoTRI/css/tel-note.css">
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="~/GoTRI/js/jquery-3.2.1.min.js"></script>
<script src="~/GoTRI/js/popper.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.3/js/bootstrap.min.js"></script>
<!--my-customer JS -->
<script src="~/GoTRI/js/my-customer.js"></script>
<script src="~/GoTRI/js/mobiscroll.custom.min.js"></script>
<link id="theme" rel="stylesheet" href="~/GoTRI/css/purplesidebar.css" type="text/css">
<style>
</style>

<script>
    $(document).ready(function () {
        BindMyCustomer();
        var a = window.screen.height;
        a = a - 130;
        $("#div_body").attr("style","height:"+a+"px;");
    });


    function BindMyCustomer() {
        $.ajax({
            type: "POST",
            url: "../KeHuZiYuanChi/ZiYuanChiFenPeiList",
            cache: false,//禁用缓存
            dataType: "json",
            success: function (result) {
                var kehuhtml = "";
                for (var i = 0; i < result.length; i++) {
                    kehuhtml += "<li class=\"list-item\" style=\"height: 5rem;\"><a href=\"../PhoneKeHu/KeHuAdd?LianXiFangShi=" + result[i].LianXiFangShi + "&Id=" + result[i].Id + "\">" +
                        "<div class=\"item-head\">" +
                        "<div class=\"head-l\"><span>" + result[i].LianXiFangShi + "</span></div>" +
                        "</div>" +
                        "</a>" +
                        "<div class=\"item-foot\">" +
                        "<div class=\"foot-left\">" +
                        "<div class=\"tel-img\" ><a  href=\"tel:" + result[i].LianXiFangShi + "\"><img style=\"width: 25px; height: 25px;\" src=\"../GoTRI/img/myCustomer/telephone.png\" /></a></div>" +
                        "<div class=\"note-img\" ><a  href=\"sms:" + result[i].LianXiFangShi + "\"><img style=\"width: 25px; height: 25px;\" src=\"../GoTRI/img/myCustomer/note.png\"></a></div>" +
                        "</div>" +
                        "<div class=\"foot-right\">" +
                        "<a href=\"../PhoneKeHu/KeHuAdd?LianXiFangShi=" + result[i].LianXiFangShi + "&Id=" + result[i].Id + "\"><img src=\"../GoTRI/img/myCustomer/revise.png\"></a>" +
                        "<span onclick='ShanChuFangFa(" + result[i].Id + ")'>×</span>" +
                        "</div></div >" +
                        "</li>"
                }
                $("#ul_main").html(kehuhtml);
            }
        });
    }

    function ShanChuFangFa(Id) {
        var Shuju = Id;
        $.ajax({
            type: "POST",
            url: "../KeHuZiYuanChi/ShanChuFangFaH",
            cache: false,//禁用缓存
            dataType: "text",
            data: { Shuju: Shuju },
            success: function (result) {
                if (result == "1") {
                    BindMyCustomer();
                } else {
                    alert("删除成功!");
                }
            }
        });
    }

</script>
<script>
    $(".yi").attr("hidden", "");
</script>
<header style="width: 100%; height: 4rem; background-color: rgb(255,135,0);">
    @*<a href="#" onclick="tiaoye()">
            <img src="~/GoTRI/img/left.png" alt="" style="float: left;
            width: 1rem;
            height: 2rem;
            margin-left: 1rem;
            margin-top: 1rem;">
        </a>*@
    <div style=" width: 100%; height: 4rem; line-height: 4rem; text-align: center; color: #fff; font-size: 1.3rem;">客户资源池</div>
</header>

    <div style="width:100%; overflow-y:scroll;" id="div_body">
        <ul class="main-rlist" id="ul_main" style="margin-top:0px; padding-right:0px;">
        </ul>
    </div>

<!-- 电话插件 -->
<div id="telephone">
    <div>
        <div class="tel">18345068265</div>
        <div class="mybtn">
            <div class="cancel">取消</div>
            <div>拨打</div>
        </div>
    </div>
</div>
<!-- 短信插件 -->
<div id="note">
    <div>
        <div class="tel">18345068265</div>
        <div class="mybtn">
            <div class="cancel">取消</div>
            <div>发短信</div>
        </div>
    </div>
</div>
<script>
    var theme = "ios";
    var mode = "scroller";
    var display = "bottom";
    var lang = "zh";
    $('#demo_date,#demo_date1,#demo_date2,#demo_date3').mobiscroll().date({
        theme: theme,
        mode: mode,
        display: display,
        lang: lang
    });
</script>
